<template>
  <view class="test-iconfont-page">
    <view class="header">
      <view class="back-btn" @tap="goBack">
        <text class="back-icon">&lt;</text>
      </view>
      <text class="page-title">图标字体测试</text>
    </view>
    
    <view class="content">
      <view class="icon-group">
        <view class="group-title">账号设置图标</view>
        <view class="icon-list">
          <view class="icon-item">
            <text class="iconfont icon-account"></text>
            <text class="icon-name">账号</text>
          </view>
          <view class="icon-item">
            <text class="iconfont icon-password"></text>
            <text class="icon-name">密码</text>
          </view>
          <view class="icon-item">
            <text class="iconfont icon-phone"></text>
            <text class="icon-name">手机</text>
          </view>
        </view>
      </view>
      
      <view class="icon-group">
        <view class="group-title">通知图标</view>
        <view class="icon-list">
          <view class="icon-item">
            <text class="iconfont icon-notification"></text>
            <text class="icon-name">通知</text>
          </view>
          <view class="icon-item">
            <text class="iconfont icon-sound"></text>
            <text class="icon-name">声音</text>
          </view>
          <view class="icon-item">
            <text class="iconfont icon-vibrate"></text>
            <text class="icon-name">振动</text>
          </view>
        </view>
      </view>
      
      <view class="icon-group">
        <view class="group-title">其他图标</view>
        <view class="icon-list">
          <view class="icon-item">
            <text class="iconfont icon-privacy"></text>
            <text class="icon-name">隐私</text>
          </view>
          <view class="icon-item">
            <text class="iconfont icon-permission"></text>
            <text class="icon-name">权限</text>
          </view>
          <view class="icon-item">
            <text class="iconfont icon-language"></text>
            <text class="icon-name">语言</text>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script setup>
// 返回上一页
const goBack = () => {
  uni.navigateBack();
};
</script>

<style lang="scss">
page {
  background-color: #f5f5f5;
  min-height: 100%;
}

.test-iconfont-page {
  min-height: 100vh;
  
  .header {
    position: relative;
    padding: 15px;
    background-color: #fff;
    border-bottom: 1px solid rgba(44, 120, 115, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    
    .back-btn {
      position: absolute;
      left: 15px;
      top: 50%;
      transform: translateY(-50%);
      width: 30px;
      height: 30px;
      display: flex;
      justify-content: center;
      align-items: center;
      
      .back-icon {
        font-size: 20px;
        font-weight: bold;
        color: #2c7873;
      }
    }
    
    .page-title {
      font-size: 18px;
      font-weight: 600;
      color: #2c7873;
    }
  }
  
  .content {
    padding: 20px 15px;
    
    .icon-group {
      margin-bottom: 30px;
      
      .group-title {
        font-size: 16px;
        font-weight: 500;
        color: #2c7873;
        margin-bottom: 15px;
        padding-left: 5px;
        border-left: 3px solid #2c7873;
      }
      
      .icon-list {
        display: flex;
        flex-wrap: wrap;
        
        .icon-item {
          width: 33.33%;
          display: flex;
          flex-direction: column;
          align-items: center;
          margin-bottom: 20px;
          
          .iconfont {
            font-size: 30px;
            color: #5d4037;
            margin-bottom: 8px;
          }
          
          .icon-name {
            font-size: 14px;
            color: #8d6e63;
          }
        }
      }
    }
  }
}
</style> 